local zhenyi = fk.CreateSkill{
  name = "bd__zhenyi",
  tags = {
    Skill.Compulsory,
    Skill.MainPlace
  }
}
Fk:loadTranslationTable{
  ["bd__zhenyi"] = "真仪",
  [":bd__zhenyi"] = "主将技，锁定技，你发动副将的非锁定技后摸一张牌并移除副将。",
}

local H = require "packages/ol_hegemony/util"

zhenyi:addEffect(fk.AfterSkillEffect, {
  can_trigger = function (self, event, target, player, data)
    return data.who == player and H.inGeneralSkills(player, data.skill.skeleton.name) == "d" and target == player and player:hasSkill(self)
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    player:drawCards(1, zhenyi.name)
    H.removeGeneral(player, true)
  end
})

return zhenyi